<script type="text/javascript">
	function checkEmpty(){
		if( (document.getElementById("addInstName").value != "") &&
			(document.getElementById("addInstUrl").value != "" ) &&
			(document.getElementById("addInstComment").value != "") ){
			document.forms[0].submit();	
		}else{
			alert("No field can be blank");
		}
	}
</script>

<div align=center style="display: inline-table; margin-right: 10px;">

<table class="fTable" align="center">
	<tr>
		<th colspan="4">Instructions</th>
	</tr>
	<tr class="subHeader">
		<td>Name</td>
		<td>URL</td>
		<td>Comments</td>
		<td style="width: 60px;">Action</td>
	</tr>

	<%if(action.getInstructionsForOfficeVisit().size()==0){ %>
	<tr>
		<td colspan="4" style="text-align: center;">No Instructions on
		record</td>
	</tr>
	<%} else { 
					for(InstructionBean b : action.getInstructionsForOfficeVisit() ) { %>
	<tr>
		<td align=center><a
			href="./editInstructions.jsp?insID=<%= StringEscapeUtils.escapeHtml("" + (b.getInstructID())) %>&ovID=<%= StringEscapeUtils.escapeHtml("" + (ovIDString)) %>"><%= StringEscapeUtils.escapeHtml("" + (b.getDescriptName())) %></a></td>
		<td><a href="<%= StringEscapeUtils.escapeHtml(""+b.getURL() )%>"><%= StringEscapeUtils.escapeHtml("" + (b.getURL())) %></td>
		<td><%= StringEscapeUtils.escapeHtml("" + (b.getComments())) %></td>
		<td><a
			href="javascript:removeID('removeInstructID','<%= StringEscapeUtils.escapeHtml("" + ( b.getInstructID() ) ) %>');">Remove</a></td>
	</tr>
	<%		}
				}%>
	<tr>
		<th colspan="4" style="text-align: center;">New</th>
	</tr>
	<tr class="subHeader">
		<td>Name</td>
		<td>URL</td>
		<td>Comments</td>
		<td rowspan="2"><input type="button" id="addinstruction"
			onclick="checkEmpty()" value="Add Instruction"></td>
	</tr>
	<td align=center><input type="text" name="addInstName"
		id="addInstName" value="" maxlength=100></td>
	<td align=center><input type="text" name="addInstUrl"
		id="addInstUrl" value="" maxlength=250 size=50></td>
	<td align=center><input type="text" name="addInstComment"
		id="addInstComment" value="" maxlength=500></td>
</table>
</div>